package bosque.unc.gui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import java.awt.Toolkit;

import javax.swing.JRootPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.JTextPane;
import javax.swing.ImageIcon;
import javax.swing.SwingConstants;
import javax.swing.JButton;
import javax.swing.UIManager;

import bosque.unc.enumerations.Ayuda;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.SystemColor;

public class AyudaGUI extends JFrame 
{
	private JPanel contentPane;
	private static Scoba scoba;
	private static AyudaGUI frame;
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) 
	{
		EventQueue.invokeLater(new Runnable() 
		{
			public void run() 
			{
			 try
             {
                 System.out.println("Look and Fell: " + UIManager.getSystemLookAndFeelClassName());
                 UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
             }
             catch (Exception ex)
             {
                 System.out.println("Failed loading L&F: ");
                 System.out.println(ex);
             }
			 
				try {
					frame = new AyudaGUI(scoba);
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public AyudaGUI(Scoba sco) 
	{
		scoba = sco;
		inicialize();
	}
	public void inicialize()
	{
		setResizable(false);
		setIconImage(Toolkit.getDefaultToolkit().getImage("D:\\WorkTesis\\Scoba\\src\\bosque\\unc\\gui\\resources\\argentina.png"));
		setTitle("Acerca de SCOBA 2013");

		setBounds(100, 100, 506, 357);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblAutores = new JLabel("Autores : ");
		lblAutores.setBounds(10, 185, 58, 14);
		contentPane.add(lblAutores);
		
		JLabel lblAbellaPabloMaximiliano = new JLabel(Ayuda.ACERCADE_ABELLA.getMsg());
		lblAbellaPabloMaximiliano.setBounds(91, 196, 146, 14);
		contentPane.add(lblAbellaPabloMaximiliano);
		
		JLabel lblMasciarelliCarlosGustavo = new JLabel(Ayuda.ACERCADE_MASC.getMsg());
		lblMasciarelliCarlosGustavo.setBounds(91, 212, 146, 14);
		contentPane.add(lblMasciarelliCarlosGustavo);
		
		JTextPane txtpnScobaEsUn = new JTextPane();
		txtpnScobaEsUn.setBackground(SystemColor.control);
		txtpnScobaEsUn.setEditable(false);
		txtpnScobaEsUn.setText(Ayuda.ACERCADE_INFO.getMsg());
		txtpnScobaEsUn.setBounds(0, 110, 500, 64);
		contentPane.add(txtpnScobaEsUn);
		
		JLabel lblImage = new JLabel("");
		lblImage.setHorizontalAlignment(SwingConstants.CENTER);
		lblImage.setIcon(new ImageIcon("D:\\WorkTesis\\Scoba\\src\\bosque\\unc\\gui\\resources\\scobaFinal.png"));
		lblImage.setBounds(0, 0, 500, 102);
		contentPane.add(lblImage);
		
		JLabel lblColaboradores = new JLabel("Colaboradores :");
		lblColaboradores.setBounds(10, 235, 77, 14);
		contentPane.add(lblColaboradores);
		
		JLabel lblIngSanchezJulio = new JLabel(Ayuda.ACERCADE_GUZZO.getMsg());
		lblIngSanchezJulio.setBounds(91, 248, 119, 14);
		contentPane.add(lblIngSanchezJulio);
		
		JLabel lblIngSolinasMiguel = new JLabel(Ayuda.ACERCADE_SOLINAS.getMsg());
		lblIngSolinasMiguel.setBounds(91, 266, 119, 14);
		contentPane.add(lblIngSolinasMiguel);
		
		JLabel lblGuzzoPablo = new JLabel(Ayuda.ACERCADE_SANCHEZ.getMsg());
		lblGuzzoPablo.setBounds(91, 284, 119, 14);
		contentPane.add(lblGuzzoPablo);
		
		JButton btnAceptar = new JButton("Aceptar");
		btnAceptar.addActionListener(new ActionListener() 
		{
			public void actionPerformed(ActionEvent e) 
			{								
				dispose();
			}
		});
		btnAceptar.setBounds(383, 295, 89, 23);
		contentPane.add(btnAceptar);
	}
}
